<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>   
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>商城购物车</title>
    <%@include file="../common/header.jsp" %>
</head>
<body>
<%@include file="../common/top.jsp" %>
<form action="${pathUrl}/home/cart/indexList" method="post" id="cartForm">
<div class="section">
    <div class="cart-head">
        <h2>我的购物车</h2>
        <div class="cart-setp">
            <ul>
                <li class="first active">
                    <div class="progress">
                        <span>1</span>
                        放进购物车
                    </div>
                </li>
                <li>
                    <div class="progress">
                        <span>2</span>
                        填写订单信息
                    </div>
                </li>
                <li class="last">
                    <div class="progress">
                        <span>3</span>
                        支付/确认订单
                    </div>
                </li>
            </ul>
        </div>
    </div>
</div>
    <div id="loadDiv">
    加载中....
    </div>
</form>
<jsp:include page="../../common/laypage.jsp"/>
<script type="text/javascript">
$(function(){
	ajaxLoad();
});
//异步加载数据
function ajaxLoad(){
	//使用异步加载数据的分装方法
	loadTable("cartForm","loadDiv","");
}

function deleteOne(id){
	var con = confirm("确定要删除该地址吗");
	if(!con){
		return;
	}
	var url="${pathUrl}/home/cart/delete";
	$.post(url,{id:id},function(result){
	ajaxLoad();
	ydlMsg(result.msg);
	});
	
}
function sumbitWirter(){
	$("#cartForm").attr("action","${pathUrl}/home/cart/writeorder");
	$("#cartForm").submit();
}
</script>
</body>
</html>